/*
 * v1.1 by tonydon site:txdnet.cn
 * netbeansIDE 7.1
 */
package cn.txdnet.txcms.domain;

import cn.txdnet.txweb.annotation.validation.CurrTime;
import cn.txdnet.txweb.annotation.validation.Default;
import cn.txdnet.txweb.annotation.validation.NotEmpty;
import cn.txdnet.txweb.annotation.validation.Size;
import cn.txdnet.txweb.annotation.validation.Validator;


/**
 *
 * @author txdnet
 */
 
public class Links  extends BaseEntity{
    private static final long serialVersionUID = -713637341649257728L;

    private Integer lkid;
    
    @Default
    private Integer cid;
    
    @Default("-")
    private String ctp;

    @NotEmpty
    @Size(min=1,max=20)
    private String title;

    @Default
    private String logopic;

    @NotEmpty
    @Size(min=1,max=512)
    private String siteurl;

    @Default
    private Byte lktype;
    
    @Default
    private Integer weight;
    
    @Default
    private Byte pubstate;
    
    @CurrTime
    private Long createtime;

    public Links() {
    }

    public Integer getLkid() {
        return lkid;
    }

    public void setLkid(Integer lkid) {
        this.lkid = lkid;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getLogopic() {
        return logopic;
    }

    public void setLogopic(String logopic) {
        this.logopic = logopic;
    }

    public String getSiteurl() {
        return siteurl;
    }

    public void setSiteurl(String siteurl) {
        this.siteurl = siteurl;
    }

    public Byte getLktype() {
        return lktype;
    }

    public void setLktype(Byte lktype) {
        this.lktype = lktype;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (lkid != null ? lkid.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Links)) {
            return false;
        }
        Links other = (Links) object;
        if ((this.lkid == null && other.lkid != null) || (this.lkid != null && !this.lkid.equals(other.lkid))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "cn.txdnet.txcms.domain.Links[ lkid=" + lkid + " ]";
    }

    @Override
    public boolean validate() {
        return Validator.validate(this);
    }

    /**
     * @return the cid
     */
    public Integer getCid() {
        return cid;
    }

    /**
     * @param cid the cid to set
     */
    public void setCid(Integer cid) {
        this.cid = cid;
    }

    /**
     * @return the ctp
     */
    public String getCtp() {
        return ctp;
    }

    /**
     * @param ctp the ctp to set
     */
    public void setCtp(String ctp) {
        this.ctp = ctp;
    }

    /**
     * @return the weight
     */
    public Integer getWeight() {
        return weight;
    }

    /**
     * @param weight the weight to set
     */
    public void setWeight(Integer weight) {
        this.weight = weight;
    }

    /**
     * @return the pubstate
     */
    public Byte getPubstate() {
        return pubstate;
    }

    /**
     * @param pubstate the pubstate to set
     */
    public void setPubstate(Byte pubstate) {
        this.pubstate = pubstate;
    }

    /**
     * @return the createtime
     */
    public Long getCreatetime() {
        return createtime;
    }

    /**
     * @param createtime the createtime to set
     */
    public void setCreatetime(Long createtime) {
        this.createtime = createtime;
    }
    
}
